from jinja2 import Environment

def environment(**options):
    env = Environment(**options)
    # 2.将自定义的过滤器添加到环境中
    env.filters['chengfa'] = chengfa

    return env

# 1.自定义过滤器
def chengfa(age):
    return age * 100